
form method = 'get'
  .well
	|营业日期：
	- if params[:check]
	  input type="text" data-behaviour='datepicker' name='start' value=params[:start] 
	  |至
	  input type="text" data-behaviour='datepicker' name='end' value=params[:end]
	- else 
	  input type="text" data-behaviour='datepicker' name='start' value=@start 
	  |至
	  input type="text" data-behaviour='datepicker' name='end' value=@end
	button type='submit' name='check' 查询
  .row
    .col-md-3
	  .small-box.bg-aqua
	    .inner
	      h3 #{@order_maintains.size}
	      p 维修台次
	    .icon
	      i.fa.fa-car
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
	.col-md-3
	  .small-box.bg-primary
	    .inner
	      h3 #{@order_maintain_total}
	      p 维修收入
	    .icon
	      i.fa.fa-inbox
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
	.col-md-3
	  .small-box.bg-green
	    .inner
	      h3 #{@order_maintain_cost}
	      p 维修成本
	    .icon
	      i.fa.fa-dropbox
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
	.col-md-3
	  .small-box.bg-yellow
	    .inner
	      h3 #{@order_maintain_total-@order_maintain_cost}
	      p 维修毛利
	    .icon
	      i.fa.fa-money
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
  .row
    .col-md-3
	  .small-box.bg-aqua
	    .inner
	      h3 #{@order_beauties.size}
	      p 美容台次
	    .icon
	      i.fa.fa-car
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
	.col-md-3
	  .small-box.bg-primary
	    .inner
	      h3 #{@order_beauty_total}
	      p 美容收入
	    .icon
	      i.fa.fa-inbox
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
	.col-md-3
	  .small-box.bg-green
	    .inner
	      h3 #{@order_beauty_cost}
	      p 美容成本
	    .icon
	      i.fa.fa-dropbox
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
	.col-md-3
	  .small-box.bg-yellow
	    .inner
	      h3 #{@order_beauty_total-@order_beauty_cost}
	      p 美容毛利
	    .icon
	      i.fa.fa-money
	    .small-box-footer
	      |More info 
	      i.fa.fa-arrow-circle-right
	    	
	 
  
  .panel.panel-default
    .panel-heading

      |出入库金额统计
    .panel-body
		.table-responsive
	      table.table.table-bordered.table-hover
	        tr
	          th 项目
	          th colspan='2' 入库金额
	          th colspan='2' 出库金额
	          
	          tr
	            td 配件采购
	            td 采购入库金额
	            td #{@part_purchase_total}
	            td 采购退货金额
	            td -
	          tr 
	            td 配件零售
	            td 销售退库金额
	            td -
	            td 销售出库金额
	            td #{@part_salse_total}
	          tr 
	            td 维修
	            td 维修退库金额
	            td -
	            td 维修出库金额
	            td #{@order_maintain_total}
	          tr 
	            td 美容
	            td 美容退库金额
	            td -
	            td 美容出库金额
	            td #{@order_beauty_total}
	          tr
	            td 合计
	            td
	            td #{@part_purchase_total}
	            td 
	            td #{@part_salse_total+@order_maintain_total+@order_beauty_total}

javascript:
  $(document).on("focus", "[data-behaviour~='datepicker']", function(e){
    $(this).datepicker({"format": "yyyy-mm-dd", "weekStart": 1, "autoclose": true, "language": "zh-CN", "todayHighlight": true});
  });